package Controler;

public class MoveForward {	
	private int xStart=0;
	private int yStart=0;
	private int xEnd=0;
	private int yEnd=0;
	
	public MoveForward(int xStart, int yStart, int xEnd, int yEnd){
		this.xStart = xStart;
		this.yStart = yStart;
		this.xEnd=xEnd;
		this.yEnd=yEnd;
	}
	
	public void printMove(){
		System.out.print("["+this.xStart+","+this.yStart+"]["+this.xEnd+","+this.yEnd+"] <> ");
	}
	
	public String toString(){
		return "["+this.xStart+","+this.yStart+"]["+this.xEnd+","+this.yEnd+"] <> ";
	}

	public int getxStart(){
		return this.xStart;
	}
	
	public int getyStart(){
		return this.yStart;
	}
	
	public int getxEnd(){
		return this.xEnd;
	}
	
	public int getyEnd(){
		return this.yEnd;
	}
	
	public boolean isOpposite(MoveBackward mb){
		if(mb==null){
			return false;
		}
		else if(this.xStart==mb.getxEnd()&&this.yStart==mb.getyEnd()
				&&this.xEnd==mb.getxStart()&&this.yEnd==mb.getyStart()){
			return true;
		}
		else{
			return false;
		}
	}
	
	public boolean isEqual(MoveForward comp){
		if(comp.getxStart()==this.xStart&&comp.getyStart()==this.yStart&&comp.getxEnd()
				==this.xEnd&&this.yEnd==comp.getyEnd()){
			return true;
		}
		else{
			return false;
		}
	}
	
}
